package com.ruowei.modules.foodOrder.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
public class MerchandiseDetailDTO {
    @ApiModelProperty(value = "属性编码")
    private String attributeCode;

    @ApiModelProperty(value = "属性名称")
    private String attributeName;

    @ApiModelProperty(value = "属性选项")
    private List<AttributeOption> options;

    public MerchandiseDetailDTO(String attributeCode, String attributeName, List<AttributeOption> options) {
        this.attributeCode = attributeCode;
        this.attributeName = attributeName;
        this.options = options;
    }

    @Data
    public static class AttributeOption {
        @ApiModelProperty(value = "选项编码")
        private String optionCode;

        @ApiModelProperty(value = "选项名称")
        private String optionName;

        public AttributeOption(String optionCode, String optionName) {
            this.optionCode = optionCode;
            this.optionName = optionName;
        }
    }
}
